#ifndef TASK_FACTORY_H
#define TASK_FACTORY_H

#include "abstract_task.h"

namespace task
{

template<class T>
class TaskFactory
{
public:

    /**
     * @brief:  创建任务实例
     * @author: sherlock_lht
     */
    template<typename... Args>
    static AbstractTaskConstPtr createTask(Args ... args)
    {
        return std::make_shared<T>(args...);
    }
};

}

#endif //TASK_FACTORY_H
